package com.hutiao.snowhb.wechat.parser;

import org.jdom.Element;
import org.jdom.JDOMException;

import com.hutiao.snowhb.wechat.vo.WxRecvEventSubscribe;
import com.hutiao.snowhb.wechat.vo.WxRecvMsg;

public class WxRecvEventSubscribeParser extends WxRecvMsgBaseParser {

	@Override
	protected WxRecvMsg parser(Element root, WxRecvMsg msg) throws JDOMException {
		String event = getElementText(root, "Event");
		String eventKey = getElementText(root, "EventKey");
		String ticket = getElementText(root, "Ticket");
		
		return new WxRecvEventSubscribe(msg, event, eventKey, ticket);
	}

}
